import React from "react";
import View from "../base/View";
import defaultData from "./data";
import { WeaInput, WeaLocaleProvider} from "ecCom";

const formatMultiLang = WeaLocaleProvider.formatMultiLang;

export default class NameView extends View {
  renderContent(data, value) {
    const { placeholder } = data;
    
    return (
      <div className='wea-edc-input-conatiner wea-input-normal'>
        <i className='icon-edc-f-name wea-edc-input-icon' />
        <WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@9w13xf`}
          className='wea-edc-switch-input'
          value={value} 
          placeholder={formatMultiLang(placeholder)} 
          onBlur={this.handleValueChange} 
        />
      </div>
    );
  }
}

NameView.defaultProps = {
  data: defaultData,
  value: ''
};